﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lib
{
    public class FPTree
    {
        public int idTree = 0;
        public List<HeaderItem> HeaderTable = new List<HeaderItem>();
        public FPNode root = new FPNode();
        public List<FPNode> Base = new List<FPNode>();
        public FPTree()
        {
            
        }
        public int numPath = 0;

        public void createTable(Dictionary<List<TransactionValue>, int> L)
        {
            foreach (var item in L)
            {
                foreach (var t in item.Key)
                {
                    HeaderTable.Add(new HeaderItem(t.AttIndex,t.AttName,t.Name, string.Format("{0}: {1}",t.AttName,t.Name), item.Value, new List<FPNode>()));

                }
            }
        }

        public List<FPNode> GetBaseTree(int id)
        {
            if (idTree == id)
                return Base;
            return null;
        }


    }
}
